Related Vulnerabilities: CVE-2021-3609  

A race condition in net/can/bcm.c in the Linux kernel allows for local privilege escalation to root. The CAN BCM networking protocol allows to register a CAN message receiver for a specified socket. The function bcm_rx_handler() is run for incoming CAN messages. Simultaneously to running this function, the socket can be closed and bcm_release() will be called. Inside bcm_release(), struct bcm_op and struct bcm_sock are freed while bcm_rx_handler() is still running, finally leading to multiple use-after-free's.

Severity Medium

Remote No

Type Privilege escalation

Description

A race condition in net/can/bcm.c in the Linux kernel allows for local privilege escalation to root. The CAN BCM networking protocol allows to register a CAN message receiver for a specified socket. The function bcm_rx_handler() is run for incoming CAN messages. Simultaneously to running this function, the socket can be closed and bcm_release() will be called. Inside bcm_release(), struct bcm_op and struct bcm_sock are freed while bcm_rx_handler() is still running, finally leading to multiple use-after-free's.

AVG-1881 linux-hardened 5.12.12.hardened1-1 Medium Vulnerable

AVG-1880 linux-zen 5.12.12.zen1-1 Medium Vulnerable

AVG-1879 linux 5.12.12.arch4-1 Medium Vulnerable

AVG-1741 linux-lts 5.10.45-1 Medium Vulnerable

https://www.openwall.com/lists/oss-security/2021/06/19/1
https://github.com/nrb547/kernel-exploitation/blob/main/cve-2021-3609/cve-2021-3609.md